<?php namespace Summer\Hjd\Models;

use Model;

/**
 * Model
 */
class MessageModel extends Model
{
    use \Winter\Storm\Database\Traits\Validation;
    

    /**
     * @var string The database table used by the model.
     */
    public $table = 'summer_hjd_message';

    /**
     * @var array Validation rules
     */
    public $rules = [
    ];

    public $belongsTo = [
        'fromuser' => ['RainLab\User\Models\User','key' => 'from_uid','otherKey'=>'id'],
        'touser' => ['RainLab\User\Models\User','key' => 'to_uid','otherKey'=>'id'],
    ];

    public $attachMany = [
        'conimg'      => 'System\Models\File',
        'repimg' => 'System\Models\File',
    ];
}
